import  requests

resp=requests.get("http://www.weather.com.cn/data/sk/101010100.html")

# 1获取响应码状态
print(resp.status_code)
# 2获取url
print(resp.url)
# 3获取字符集编码
print(resp.encoding)
# 设置字符编码
resp.encoding="utf-8"
# 4获取响应头书籍
print(resp.headers)
# 5.获取文本格式响应头
print(resp.text)
print('*'*80)
print(resp.json())